﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;

namespace API.Taolx.Shopping.Common
{
    [XmlRootAttribute("APIProtocolPackage")]
    public class Entity
    {
        [XmlElementAttribute()]
        public string IsSuccess { get; set; }
        [XmlElementAttribute()]
        public string Code { get; set; }
        [XmlElementAttribute()]
        public string ErrorMessage { get; set; }
        [XmlElementAttribute()]
        public int ProtocolType { get; set; }
        [XmlElementAttribute()]
        public string CustomerData { get; set; }
        [XmlElementAttribute()]
        public string DistributorType { get; set; }
        [XmlElementAttribute()]
        public string Channel { get; set; }
        public string Interface { get; set; }
        [XmlElementAttribute()]
        public bool IsError { get; set; }
        [XmlElementAttribute()]
        public string RequestBody { get; set; }
        [XmlElementAttribute()]
        public string ResponseBody { get; set; }
        [XmlElementAttribute()]
        public Header Header { get; set; }

    }
    [XmlTypeAttribute()]
    public class Header
    {
        [XmlAttributeAttribute()]
        public string ClientIP { get; set; }
        [XmlAttributeAttribute()]
        public bool ClientName { get; set; }
        [XmlAttributeAttribute()]
        public string ClientVersion { get; set; }
        [XmlAttributeAttribute()]
        public string DeviceId { get; set; }
        [XmlAttributeAttribute()]
        public string DeviceType { get; set; }
        [XmlAttributeAttribute()]
        public string Timestamp { get; set; }
        [XmlAttributeAttribute()]
        public string Token { get; set; }
        [XmlAttributeAttribute()]
        public string UID { get; set; }
        [XmlAttributeAttribute()]
        public int ChannelSource { get; set; }
        [XmlAttributeAttribute()]
        public int CustomerData { get; set; }


    }


    public enum RequestType
    {
        XML = 0,
        JSON = 1
    }

    public enum InterfaceName
    {
        SearchKeyWord,
        SearchV4,
        Trains_By_Station
    }

}
